/**
 * 我的界面
 */
 'use strict';
 import React, {Component} from 'react';
 import {
      View,
      Text,
      TouchableOpacity,
      Image,
      InteractionManager,
      Dimensions,
      StyleSheet,
      ToastAndroid,
  } from 'react-native';

import TableRow from '../../component/TableRow';

var { height,width } =  Dimensions.get('window');

class Mine extends Component {

      render() {
          return (
            <View style={{flex:1,backgroundColor:'#f6f5fa'}}>
              {/* 导航 */}
              <View style={{height:49,backgroundColor:'white',flexDirection:'row'}}>
                 <View style={{flex:1,alignItems:'center',justifyContent:'center'}}>
                    <Text style={{fontSize:16,color:'#222222',alignSelf:'center'}}>我的</Text>
                 </View>
              </View>
              {/* 登录状态|个人信息栏 */}
              <View style={{backgroundColor:'white', marginTop:16}}>
                 <View style={{flexDirection:'row', height:84, alignItems:'center'}}>
                    <TouchableOpacity onPress={() => {this.loginButtonActiom()}} >
                        <Image  style={{width:64,height:64,marginLeft:17}} source={require('../../../resources/images/mine/icon_header.png')}/>
                    </TouchableOpacity>
                    <View style={{flexDirection:'column',justifyContent:'center',marginLeft:17}}>
                       <Text style={{color:'#999999'}}>未登录</Text>
                    </View>
                    <View style = { styles.item_arrow_view } >
                       <Image source = { require('../../../resources/images/mine/icon_s_right_arrow.png') } style = { { width: 17, height: 17 } }/>
                    </View>
                 </View>
              </View>

              <View style={{backgroundColor:'white', marginTop:21}}>
                 {/* 我的资产 */}
                 <View style={styles.top_line}></View>
                 <TableRow title='我的资产' icon={require('../../../resources/images/mine/icon_my_property.png')} onPress={()=>this.itemActionIndex(0)}/>
                 {/* 分割线 */}
                 <View style={styles.center_line}></View>
                 {/* 交易账单 */}
                 <TableRow title='交易账单' icon={require('../../../resources/images/mine/icon_trade_bill.png')} onPress={()=>this.itemActionIndex(0)}/>
                 {/* 分割线 */}
                 <View style={styles.center_line}></View>
                 {/* 绑定银行卡 */}
                 <TableRow title='绑定银行卡' icon={require('../../../resources/images/mine/icon_binding_bank_card.png')} onPress={()=>this.itemActionIndex(0)}/>
                 {/* 分割线 */}
                 <View style={styles.center_line}></View>
                 {/* 风险评估 */}
                 <TableRow title='风险评估' icon={require('../../../resources/images/mine/icon_risk_evaluation.png')} onPress={()=>this.itemActionIndex(0)}/>
                 {/* 分割线 */}
                 <View style={styles.top_line}></View>
              </View>

              <View style={{backgroundColor:'white', marginTop:21}}>
                 {/* 分割线 */}
                 <View style={styles.top_line}></View>
                 {/* 收藏 */}
                 <TableRow title='收藏' icon={require('../../../resources/images/mine/icon_mine_collection.png')} onPress={()=>this.itemActionIndex(0)}/>
                 {/* 分割线 */}
                 <View style={styles.center_line}></View>
                 {/* 帮助 */}
                 <TableRow title='帮助' icon={require('../../../resources/images/mine/icon_help.png')} onPress={()=>this.itemActionIndex(0)}/>
                 {/* 分割线 */}
                 <View style={styles.center_line}></View>
                 {/* 邀请好友 */}
                 <TableRow title='邀请好友' icon={require('../../../resources/images/mine/icon_redpackage.png')} onPress={()=>this.itemActionIndex(0)}/>
                 {/* 分割线 */}
                 <View style={styles.center_line}></View>
                 {/* 关于我们 */}
                 <TableRow title='关于我们' icon={require('../../../resources/images/mine/icon_version.png')} onPress={()=>this.itemActionIndex(0)}/>
                 {/* 分割线 */}
                 <View style={styles.top_line}></View>
              </View>
          </View>
          );
      }
  }

  const styles = StyleSheet.create({
      top_line:{
          height:0.5,
          backgroundColor:'#dfdfdf'
      },
      center_line:{
          marginLeft:17,
          height:0.5,
          backgroundColor:'#dfdfdf'
      },
      item_arrow_view: {
          justifyContent: 'center',
          flex: 1,
          alignItems: 'flex-end',
          marginRight: 17
      },
      modify_item:{
          alignItems:'flex-end',
          flex:1,
          marginRight:10,
          marginTop:15
      }
  });
  export default Mine;
